package com.cruel_wandering.wifi_geo_predictor;

import com.cruel_wandering.wifi_geo_predictor.wifi_simulation.MyWifiInfo;

import android.location.Location;

public class DBEntry
{
	private static final int defaultRadius = 20; 
	private String ap_BSSID;
	private String ap_SSID;
	private Location ap_location;
	private long radius;
	private Location points[] = new Location[4];


	public DBEntry(MyWifiInfo wInfo, Location location)
	{
		if(wInfo != null){
			ap_location = new Location(location);
			ap_BSSID = wInfo.getBSSID();
			ap_SSID = wInfo.getSSID();
			points[0] = new Location(location);	
			radius = defaultRadius;
		}
	}

	public void setPoint(Location point, int index)
	{
		this.points[index] = new Location(point);
	}

	public Location getPoint(int index)
	{
		return points[index];
	}

	public Boolean pointExist(int index)
	{
		if(points == null) return false;
		return (points[index] == null) ? false : true;
	}

	public void setRadius(long radius)
	{
		this.radius = radius;
	}

	public long getRadius()
	{
		return radius;
	}

	public void setAp_location(Location ap_location)
	{
		this.ap_location = ap_location;
	}

	public Location getAp_location()
	{
		return ap_location;
	}

	public String getBSSID()
	{
		return ap_BSSID;
	}

	public String getSSID()
	{
		return ap_SSID;
	}

}
